-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create table in integration table from evadb select query #1125
Conversation
1. Converting to lowercase for the time being. Changing the binder to take care of case sensitive databases is a long commitment and we can revisit it later.
"""USE test_data_source { | ||
DROP TABLE IF EXISTS derived_table | ||
}""", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the clean up code? If so, shall we put it in the cls teardown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. The test class is getting complicated and needs to be simplified.
"DATETIME": datetime.datetime, | ||
} | ||
|
||
def preprocess_sqlite_type(sqlite_type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will be the format of sqlite_type
passed in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need a separate local function anymore. I can directly call the split on the input of the outer function.
@@ -146,3 +151,45 @@ def execute_native_query(self, query_string: str) -> DBHandlerResponse: | |||
return DBHandlerResponse(data=self._fetch_results_as_df(cursor)) | |||
except sqlite3.Error as e: | |||
return DBHandlerResponse(data=None, error=str(e)) | |||
|
|||
def _sqlite_to_python_types(self, sqlite_type: str): | |||
mapping = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably already explained once, but why don't we directly map to ColumnType
?
And, how do we handle types that are not part of our ColumnType
(e.g., DATETIME
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Don't want to expose EvaDB types to third-party integrations.
- We don't support it right now.
CREATE TABLE postgres_db.table AS SELECT ...
native_storage_engine
tosqlalchemy